package com.domain.service.impl;

import com.domain.dao.UsersRelationshipMapper;
import com.domain.pojo.UsersRelationship;
import com.domain.service.UsersRelationshipService;
import com.domain.utils.NotNullUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class UsersRelationshipServiceImpl implements UsersRelationshipService {

    @Autowired
    UsersRelationshipMapper usersRelationshipMapper;

    /**
     * 根据父节点获取下面所有子节点
     *
     * @param usersId
     * @return
     */
    @Override
    public List<UsersRelationship> getTree(String usersId) {
        //获取所有的直接好友
        List<UsersRelationship> list = usersRelationshipMapper.getNodeTree(usersId);

        return list;
    }

}

